package in.muton.edushare.pages.univ;

import in.muton.edushare.components.alertpanel.AlertPanel;
import in.muton.edushare.components.messaging.recievepanel.IncomingMessagesPanel;
import in.muton.edushare.components.messaging.sendpanel.ActionPanel;
import in.muton.edushare.wicket.models.CayenneModel;

import org.apache.wicket.PageParameters;

import com.edushare.common.constants.ApplicationConstants;

public class UnivPage extends UnivBase {

	public UnivPage(PageParameters params) {
		super(params);
		add(new ActionPanel("actionPanel", getModel().getObject(), this));
		add(new IncomingMessagesPanel("msgPanel", getModel().getObject()));
		add(new AlertPanel("alertPanel", new CayenneModel<Object>(getModel()
				.getObject())));
	}

	@Override
	public String getActivePage(PageParameters p) {
		return "UnivUpdates";
	}

	@Override
	public String getPageTitle() {
		return getLoggedInUser().getCompleteUserName() + " | "
				+ getModel().getObject().getUniversityName() + " | "
				+ ApplicationConstants.APPLICATION_NAME;
	}
}
